package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;

/**
 * <p>
 * 标题: 会员酒吧积分表, tc_vip_bar_credit_info 数据类 POJO
 * <p>
 * Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>
 * Copyright: Copyright (c) 2014-10
 * <p>
 * Company:
 * 
 * @author you name
 * @version 1.0
 */

public class VipBarCredit extends BaseEntity {

	// date formats

	// columns START
	/** 序列 */
	private java.lang.Integer id;
	/** 会员ID */
	private java.lang.Integer vipId;
	/** 酒吧ID */
	private java.lang.Integer barId;
	/** 会员名 */
	private java.lang.String vipName;
	/** 酒吧名 */
	private java.lang.String barName;
	/** 积分数 */
	private java.lang.Integer credit;

	private java.util.ArrayList idList;

	// columns END add vipName barName

	public VipBarCredit() {
	}

	public VipBarCredit(java.lang.Integer id) {
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}

	public java.lang.Integer getId() {
		return this.id;
	}

	public void setVipId(java.lang.Integer value) {
		this.vipId = value;
	}

	public java.lang.String getVipName() {
		return vipName;
	}

	public void setVipName(java.lang.String vipName) {
		this.vipName = vipName;
	}

	public java.lang.String getBarName() {
		return barName;
	}

	public void setBarName(java.lang.String barName) {
		this.barName = barName;
	}

	public java.lang.Integer getVipId() {
		return this.vipId;
	}

	public void setBarId(java.lang.Integer value) {
		this.barId = value;
	}

	public java.lang.Integer getBarId() {
		return this.barId;
	}

	public void setCredit(java.lang.Integer value) {
		this.credit = value;
	}

	public java.lang.Integer getCredit() {
		return this.credit;
	}

	public java.util.ArrayList getIdList() {
		return idList;
	}

	public void setIdList(java.util.ArrayList idList) {
		this.idList = idList;
	}

	/** 手动增加属性后,toString,hashCode,equals都要修改 */
	public String toString() {
		return new ToStringBuilder(this).append("Id", getId())
				.append("VipId", getVipId()).append("BarId", getBarId())
				.append("Credit", getCredit()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getId()).append(getVipId())
				.append(getBarId()).append(getCredit()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof VipBarCredit == false)
			return false;
		if (this == obj)
			return true;
		VipBarCredit other = (VipBarCredit) obj;
		return new EqualsBuilder().append(getId(), other.getId())
				.append(getVipId(), other.getVipId())
				.append(getBarId(), other.getBarId())
				.append(getCredit(), other.getCredit()).isEquals();
	}
}
